package mark.tom.detector.demo;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.TextView;

import mark.tom.detector.IntegrityDetector;
import mark.tom.detector.SimulatorDetector;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        TextView textView = findViewById(R.id.textView);

        StringBuilder sb = new StringBuilder();

        sb.append("使用SimulatorDetector 检测结果如下(Yes/No == 是/否): \n\n");
        if (new SimulatorDetector(getApplicationContext(), true).check()) {
            sb.append("Yes");
        } else {
            sb.append("No");
        }
        sb.append("\n\n");

        sb.append("使用IntegrityDetector 检测结果如下(Yes/No == 完整/缺失): \n\n");
        if (new IntegrityDetector(getApplicationContext(), true).check()) {
            sb.append("Yes");
        } else {
            sb.append("No");
        }
        sb.append("\n\n");

        textView.setText(sb.toString());
    }
}
